package com.honeyms.framework.web.page;

import com.honeyms.common.utils.StringUtils;

public class BlogPageDomain {
	 /** 当前记录起始索引 */
    private Integer pageNum;

    /** 每页显示记录数 */
    private Integer pageSize;

    /** 排序列 */
    private String orderByColumn;
    
    /** 自定义参数列 */
    private String objColumn;

    /** 排序的方向desc或者asc */
    private String isAsc = "asc";

    public String getOrderBy()
    {
        if (StringUtils.isEmpty(orderByColumn))
        {
            return "";
        }
        return StringUtils.toUnderScoreCase(orderByColumn) + " " + isAsc;
    }

    public Integer getPageNum()
    {
        return pageNum;
    }

    public void setPageNum(Integer pageNum)
    {
        this.pageNum = pageNum;
    }

    public Integer getPageSize()
    {
        return pageSize;
    }

    public void setPageSize(Integer pageSize)
    {
        this.pageSize = pageSize;
    }

    public String getOrderByColumn()
    {
        return orderByColumn;
    }

    public void setOrderByColumn(String orderByColumn)
    {
        this.orderByColumn = orderByColumn;
    }

    public String getIsAsc()
    {
        return isAsc;
    }

    public void setIsAsc(String isAsc)
    {
        this.isAsc = isAsc;
    }

	public String getObjColumn() {
		return objColumn;
	}

	public void setObjColumn(String objColumn) {
		this.objColumn = objColumn;
	}

	@Override
	public String toString() {
		return "{\"pageNum\":\"" + pageNum + "\", \"pageSize\":\"" + pageSize + "\", \"orderByColumn\":\""
				+ orderByColumn + "\", \"objColumn\":\"" + objColumn + "\", \"isAsc\":\"" + isAsc + "\"}";
	}
}
